package com.quyeying.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.quyeying.entity.TblPopularizeVideoEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.quyeying.utils.result.R;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

import java.util.Map;

/**
* <p>
 * 推广视频表 服务类
 * </p>
*
* @author skx
* @since 2022-10-20
*/
public interface TblPopularizeVideoService extends IService<TblPopularizeVideoEntity> {

    /**
     * 查询推广视频表分页数据
     *
     *
     * @param request
     * @param page      页码
     * @param pageCount 每页条数
     * @return R
     */
    R findListByPage(HttpServletRequest request, Integer page, Integer pageCount, Long merchantId, String end);

    /**
     * 商户端-视频列表分页查询
     * @param request
     * @param current
     * @param size
     * @return
     */
    R merchantVideoPage(HttpServletRequest request, Integer current, Integer size, String account, String end);

    /**
     * 添加推广视频表
     *
     * @param tblPopularizeVideoEntity 推广视频表
     * @return R
     */
    R add(TblPopularizeVideoEntity tblPopularizeVideoEntity, String account);

    /**
     * 删除推广视频表
     *
     * @param id 主键
     * @return R
     */
    R delete(Long id);

    /**
     * 修改推广视频表
     *
     * @param tblPopularizeVideoEntity 推广视频表
     * @return R
     */
    R updateData(TblPopularizeVideoEntity tblPopularizeVideoEntity);

    /**
     * id查询数据
     *
     * @param id id
     * @return R
     */
    R findById(Long id);

    /**
     * 获取最新商品视频分页接口
     */
    Page<Map<String, Object>> newVideos(HttpServletRequest request, Page<Map<String, Object>> page, Long vid);

    /**
     * 增加分享数
     * @param tblPopularizeVideoEntity
     * @return
     */
    R updateShareNum(TblPopularizeVideoEntity tblPopularizeVideoEntity);

    R addVideoBrowseNum(HttpServletRequest request, Long videoId);

    R randomVideoList(HttpServletRequest request);

    R findByVideoId(HttpServletRequest request, Long id);
}
